<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product_details', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('product_id')->comment('产品id');
            $table->string('grade', 40)->nullable()->comment('适用年级');
            $table->string('upc', 50)->nullable()->comment('商品编码');
            $table->integer('pages')->nullable()->comment('页数');
            $table->date('date')->nullable()->comment('出版日期');
            $table->string('isbn', 50)->nullable()->comment('ISBN');
            $table->string('package', 50)->nullable()->comment('书籍包装');
            $table->string('format', 50)->nullable()->comment('书籍规格');
            $table->string('material', 50)->nullable()->comment('纸张材质');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product_details');
    }
}
